<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php $this->load->view('admin/global/header'); ?>
<?php $this->load->view('admin/global/left'); ?>
<table cellpadding="0" cellspacing="0">
    <tr>
        <td class="title"><?php echo lang('UPLOAD').': '.lang('MEDIA'); ?></td>
    </tr>
    <?php if(isset($denied)){ ?>
    <tr>
        <td class="bar">
            <div class="error"><?php echo lang('DENIED'); ?></div>
            <meta http-equiv="refresh" content="5; <?php echo base_url().ADMIN_PATH; ?>" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php if($success == true){ ?>
    <tr>
        <td class="bar">
            <div class="success"><?php echo lang('SUCCESS_UPLOAD_MEDIA'); ?></div>
            <meta http-equiv="refresh" content="1" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php echo Modules::run('admin/bar_module/index', $buttons); ?>
    <tr>
        <td valign="top">
        <form name="frmPost" id="frmPost" method="post" enctype="multipart/form-data">
            <table class="form" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="label"><span class="red">*</span> <?php echo lang('DIR'); ?></td>
                    <td>
                        <select name="txtDir" class="select">
                            <?php foreach($imageDirs as $imageDir){ ?>
                            <option value="images/<?php echo $imageDir; ?>/" <?php if($imageDir == 'news'){echo 'selected="selected"';} ?>>images/<?php echo $imageDir; ?>/</option>
                            <?php } ?>
                            <?php foreach($flashDirs as $flashDir){ ?>
                            <option value="flash/<?php echo $flashDir; ?>/">flash/<?php echo $flashDir; ?>/</option>
                            <?php } ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('MEDIA'); ?> (1):</td>
                    <td>
                        <input type="file" name="txtMedia1" />
                        <img src="<?php echo base_url(); ?>templates/admin/images/tip.jpg" class="tip vtip" title="<?php echo lang('MEDIA_UPLOAD_TIP'); ?>" align="top" />
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('MEDIA'); ?> (2):</td>
                    <td>
                        <input type="file" name="txtMedia2" />
                        <img src="<?php echo base_url(); ?>templates/admin/images/tip.jpg" class="tip vtip" title="<?php echo lang('MEDIA_UPLOAD_TIP'); ?>" align="top" />
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('MEDIA'); ?> (3):</td>
                    <td>
                        <input type="file" name="txtMedia3" />
                        <img src="<?php echo base_url(); ?>templates/admin/images/tip.jpg" class="tip vtip" title="<?php echo lang('MEDIA_UPLOAD_TIP'); ?>" align="top" />
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('MEDIA'); ?> (4):</td>
                    <td>
                        <input type="file" name="txtMedia4" />
                        <img src="<?php echo base_url(); ?>templates/admin/images/tip.jpg" class="tip vtip" title="<?php echo lang('MEDIA_UPLOAD_TIP'); ?>" align="top" />
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('MEDIA'); ?> (5):</td>
                    <td>
                        <input type="file" name="txtMedia5" />
                        <img src="<?php echo base_url(); ?>templates/admin/images/tip.jpg" class="tip vtip" title="<?php echo lang('MEDIA_UPLOAD_TIP'); ?>" align="top" />
                    </td>
                </tr>
            </table>
        </form>
        </td>
    </tr>
    <?php } ?>
    <?php } ?>
</table>
<?php $this->load->view('admin/global/right'); ?>
<?php $this->load->view('admin/global/footer'); ?>